<template>
    <ElementTableCpn
        :columns="columns"
        :tableData="tableData"
        :total="total"
        :pagination="pagination"
        :loading="loading"
        :fromList="fromList"
        @changebtn="changeBtn"
        @handleCurrentChange="handleCurrentChange"
        @searchData="searchData"
        @addTrue="addTrue"
    />
    <ElementDialogCpn
        :dialogConfig="dialogConfig"
        :dialogData="dialogDatas"
        :dialogOptions="dialogOptions"
        @submitDialog="submitDialog"
    >
        <!-- <template #default="scope"> </template> -->
    </ElementDialogCpn>
    <button @click="topath">跳转</button>
    <RouterView />
</template>

<script setup lang="ts">
import {
    columns,
    getData,
    data,
    pagination,
    changeBtn,
    handleCurrentChange,
    loading,
    fromList,
    searchData,
    addTrue,
    dialogOptions,
    submitDialog
} from './homeTs';
import { toRefs, onMounted } from 'vue';
import { useRouter } from 'vue-router';
let router = useRouter();
let { tableData, total, dialogDatas, dialogConfig } = toRefs(data);
onMounted(() => {
    getData();
});
function topath() {
    router.push('/home/about');
}
</script>

<style scoped></style>
